#pragma once
/*--------------------------------------------------------------------------------
 * Adaptive Intelligence - Foundation Framework Class Library
 * Version 2.00
 * 
 * DNS NULL Record Structure
 *      Represents NULL data for a DNS resource record.
 *------------------------------------------------------------------------------*/

/*--------------------------------------------------------------------------------
 * System Imports
 *------------------------------------------------------------------------------*/
#include "stdafx.h"
using namespace System;
using namespace System::Net;

namespace Adaptive
{
	namespace Network
	{
		namespace Dns
		{
			/// <summary>
			/// Represents NULL data for a DNS resource record.
			/// </summary>
			public value struct DnsNullRecord
			{
			internal:
				/// <summary>
				/// Initializes a new instance of the class from the unmanaged record.
				/// </summary>
				/// <param name="record"> A pointer to a DNS_RECORD structure whose contents are to be copied.</param>
				DnsNullRecord(DNS_RECORD* record)
				{
					if (record == NULL)
					{
						Data = nullptr;
					}
					else
					{
						Data = gcnew array<Byte>(1);
						for(int count = 0; count < 1; count++)
							Data[count] = (Byte)record->Data.Null.Data[count];
					}
				}
				private:
				/// <summary>
				/// Static constructor.
				/// </summary>
				static DnsNullRecord()
				{
				}
			public:

				/// <summary>
				/// A byte array containing the "NULL" data.
				/// </summary>
				/// <value>
				/// A byte array or <b>null</b>.
				/// </value>
				array<Byte>^	Data;
			};
		}
	}
}
